﻿<template id="single_table_operation_template">
    <el-table-column v-if="count" label="操作" fixed="right" :width="width" align="center">
        <template #default="scope">
            <el-space><slot v-bind="scope"></slot></el-space>
        </template>
    </el-table-column>
</template>
<script type="text/javascript">
    var single_table_operation = {
        template: "#single_table_operation_template",
        data() {
            return {
                width: 0
            }
        },
        props: ["count"],
        methods: {
            init() {
                this.width = this.count * 62 + 30;
            }
        },
        mounted() { this.init(); }
    };
</script>